package com.company;
public class Main {
    public static void main(String[] args) {
        doSwim(new Anemonefish("尼莫"));
        doSwim(new Shark("蘭尼"));
        doSwim(new Human("賈斯汀"));
        doSwim(new Submarine("黃色一號"));
        doSwim(new Seaplane("空军一号"));
        doSwim(new FlyingFish("filipies"));
    }

    static void doSwim(Swimmer swimmer) {
        swimmer.swim();
    }
}